/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Endstart
 * Date: 2021-06-19
 * Time: 9:41
 */
public class RentalFactory {

    public RentalProperty createProperty(int option) {
        if (option == 1) {
            return new Unit();
        } else if (option == 2) {
            return new TownHouse();
        } else if (option == 3) {
            return new Apartment();
        } else {
            return null;
        }
    }
}
